#!/bin/bash
#配置项
#1. 更新软件源为清华源和阿里源
#2. 安装常用软件包
#3. 安装oh-my-zsh
#

BasicCore="
ntfs-3g
gvfs
gvfs-afc
gvfs-gphoto2
gvfs-mtp
gvfs-smb
htop
gzip
xarchiver
yay
zip
xz
xorg-server
xorg-twm
xorg-xhost
xorg-xinit
xorg-xkill
xorg-xprop
xf86-input-evdev
xf86-input-libinput
xf86-input-void
xf86-video-intel
xorg-bdftopcf
xorg-docs
xorg-font-util
xorg-fonts-100dpi
xorg-fonts-75dpi
xorg-fonts-alias-100dpi
xorg-fonts-alias-75dpi
xorg-fonts-encodings
xorg-iceauth
xorg-mkfontscale
xorg-server
xorg-server-common
xorg-server-devel
xorg-server-xephyr
xorg-server-xnest
xorg-server-xvfb
xorg-sessreg
xorg-setxkbmap
xorg-smproxy
xorg-util-macros
xorg-x11perf
xorg-xauth
xorg-xbacklight
xorg-xcmsdb
xorg-xcursorgen
xorg-xdpyinfo
xorg-xdriinfo
xorg-xev
xorg-xgamma
xorg-xhost
xorg-xinit
xorg-xinput
xorg-xkbcomp
xorg-xkbevd
xorg-xkbutils
xorg-xkill
xorg-xlsatoms
xorg-xlsclients
xorg-xmodmap
xorg-xpr
xorg-xprop
xorg-xrandr
xorg-xrdb
xorg-xrefresh
xorg-xset
xorg-xsetroot
xorg-xvinfo
xorg-xwayland
xorg-xwd
xorg-xwininfo
xorg-xwud
xorgproto
fcitx5
"

ttfFont="
ttf-bitstream-vera
ttf-dejavu
ttf-droid
ttf-font-awesome
ttf-font-logos
ttf-inconsolata
ttf-indic-otf
ttf-liberation
ttf-wps-fonts
wqy-zenhei
noto-fonts-emoji
ttf-font-awesome-k
ttf-font-awesome
"
#pnmixer
i3wmSotfs="
network-manager-applet
xautolock
xfce4-power-manager
rofi
blurlock
barrier
nitrogen
pamac-tray
clipit
bluedevil
blueman
bluez
bluez-libs
bluez-qt
bluez-utils
blurlocker
pulseaudio
pulseaudio-alsa
pulseaudio-bluetooth
alsa-card-profiles
alsa-lib
alsa-plugins
alsa-topology-conf
alsa-ucm-conf
alsa-utils
pa-applet-git
"


Basic_softs_pkg="
vim
zsh
git
ssh
zip
curl
gedit
htop
samba
dos2unix
libpng12-0
gdebi
cifs-utils
nfs-common
openssh-server
openjdk-8-jdk
terminator
silversearcher-ag
autojump
gedit
software-properties-common
cmake
zeal
screenfetch
visual-studio-code-bin
"

Common_softs_package="smplayer
				  filezilla
				  geany
				  virtualbox-6.0
				  notepadqq
				  guake
				  teamviewer
				  synergy
				  typora
				  bcompare
				  deepin.com.wechat
				  deepin.com.qq.office
				  sublime-text
                  android-studio
				  "

Android_build_pkg="flex
				  bison
				  gperf
				  build-essential
				  tofrodos
				  python-markdown
				  libxml2-utils
				  xsltproc
				  dpkg-dev
				  libsdl1.2-dev
				  libesd0-dev
				  git-core
				  gnupg
				  bison
				  gperf
				  build-essential
				  zlib1g-dev
				  gcc-multilib
				  g++-multilib
				  libx11-dev:i386
				  libgl1-mesa-dev
				  file
				  libc6-dev-i386
				  lib32ncurses5-dev
				  x11proto-core-dev
				  libx11-dev
				  libncurses5
				  libncurses5-dev
				  libgl1-mesa-dev
				  libxml2-utils
				  xsltproc
				  unzip
				  m4
				  lib32z-dev
				  ccache
				  libswitch-perl
				  adb
				  fastboot
                  libxml-simple-perl
                  libssl-dev
                  python-pip
                  libssh-dev
				  "

function install_pkg
{
        echo "开始安装""$1"
        echo "开始安装""$1" >> /tmp/install.log
        sudo apt-get install -y $1 >> /tmp/install.log
        ret="$?"
        echo "安装结束，返回值""$ret"
        echo "安装结束，返回值""$ret" >> /tmp/install.log
        echo " " >> /tmp/install.log
        echo " " >> /tmp/install.log
}

function install_softs_all_deepin
{
	sudo apt-get update
	for pkg in $Basic_softs_pkg
	do
		install_pkg $pkg
	done

	for pkg in $Common_softs_package
	do
		install_pkg $pkg
	done

	for pkg in $Android_build_pkg
	do
		install_pkg $pkg
	done
}

function install_pkg_arch
{
        echo "开始安装""$1"
        echo "开始安装""$1" >> /tmp/install.log
        sudo pacman -S  --noconfirm $1  >> /tmp/install.log
        ret="$?"
        echo "安装结束，返回值""$ret"
        echo "安装结束，返回值""$ret" >> /tmp/install.log
        echo " " >> /tmp/install.log
        echo " " >> /tmp/install.log
}


function install_softs_all_arch
{
	sudo pacman -Syu
	for pkg in $Basic_softs_pkg
	do
		install_pkg_arch $pkg
	done

	for pkg in $Common_softs_package
	do
		install_pkg_arch $pkg
	done

	for pkg in $Android_build_pkg
	do
		install_pkg_arch $pkg
	done
}



install_softs_all_deepin
